import ZAudio from "./zaudio.js"
import {
    getCache
} from '@/utils/cache.js'

let audio = new ZAudio({
    continuePlay: false, //续播
    autoPlay: false, //自动播放 部分浏览器不支持
});

let playList = getCache('PLAY_LIST')
if (!playList || playList == '') {
    playList = []
}
console.log('[信息]播放列表', playList)
if (JSON.stringify(playList).substr(0, 1) != '[') {
    playList = [playList]
}
audio.setAudio(playList)

module.exports = {
    audio
}
